from django import forms
from blog.models import Comment

class CommentForm(forms.ModelForm):
    class Meta:
        model  = Comment
        exclude = ('created_at', 'post')
        widgets = {
            'name'    : forms.TextInput(attrs = {'class':'span3'}),
            'content' : forms.Textarea(attrs = {'class':'span6', 'rows':5})
        }

    def clean(self):
        cleaned_data = super(CommentForm, self).clean()
        return cleaned_data